<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:output method="xml" indent="yes"/>
	
	<xsl:template match="HeaderInfo">
<configuration>
	<configSections>
		<section name="hibernate-configuration"
		     type="NHibernate.Cfg.ConfigurationSectionHandler, NHibernate" />
		<section name="log4net"
			    type="log4net.Config.Log4NetConfigurationSectionHandler,log4net"/>
	</configSections>

	<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
		<session-factory>
			<property name="dialect">NHibernate.Dialect.MsSql2005Dialect</property>
			<property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
			<property name="connection.driver_class">NHibernate.Driver.SqlClientDriver</property>
			<property name="connection.connection_string"><xsl:value-of select="DBConnection"/></property>
			<property name="connection.isolation">ReadCommitted</property>
			<xsl:comment>HBM Mapping Files</xsl:comment>
			<mapping><xsl:attribute name="assembly"><xsl:value-of select="ProjectName"/>.Core</xsl:attribute></mapping>
		</session-factory>
	</hibernate-configuration>



	<log4net>
		<appender name="LogAllToFile" type="log4net.Appender.FileAppender">
			<file><xsl:attribute name="value"><xsl:value-of select="ProjectName"/>.log4net.log</xsl:attribute></file>
			<appendToFile value="false"/>
			<layout type="log4net.Layout.PatternLayout">
			<conversionPattern value="%d [%t] %-5l - %m%n%n"/>
			</layout>
		</appender>
		<root>
			<priority value="ALL"/>
			<appender-ref ref="LogAllToFile"/>
		</root>
	</log4net>
</configuration>


	</xsl:template>
</xsl:stylesheet>